Window.Toast = {
    /**
     * @str toast的文案
     * @duration toast显示时间，单位是ms
     */
    ShowToast(str,duration) {
        let toast_label = cc.find('Toast').getComponent(cc.Label);
        if(cc.sys.language != cc.sys.LANGUAGE_CHINESE){
            toast_label.string = MyLanguage[str].en;
        } else {
            toast_label.string = MyLanguage[str].zh;
        }
        setTimeout(function () {
            toast_label.string = '';
        },duration)
    },
}